package src.first;

public class test4 {

    public static void main(String[] args) {
        double[] array = new double[5];
        for (int i = 0; i < array.length; i++) {
            array[i] = 100 * Math.random();
        }
        System.out.println("原数组：");
        printFirst(array);
        MaxMin.Result result = MaxMin.getResult(array);
        double max = result.getMax();
        double min = result.getMin();
        System.out.println();
        System.out.println(max+","+min);
    }

    public static void printFirst(double[] array){
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+",");
        }
    }
}
